package org.com.ashen.service.service.datasourcemanage;

import org.com.ashen.common.common.datasource.DataSourceDTO;
import org.com.ashen.dal.dataobject.DataSourceDO;

public class DatasourceConvert {
	 public static DataSourceDTO conventToDatasourceDTO(DataSourceDO dataSourceDO) {
	        if (dataSourceDO == null) {
	            return null;
	        }
	        DataSourceDTO dataSourceDTO = new DataSourceDTO();
	        dataSourceDTO.setDatabaseIp(dataSourceDO.getDatabaseIp());
	        dataSourceDTO.setDatabaseName(dataSourceDO.getDatabaseName());
	        dataSourceDTO.setDatabasePort(dataSourceDO.getDatabasePort());
	        dataSourceDTO.setDatasourceName(dataSourceDO.getDatasourceName());
	        dataSourceDTO.setUsername(dataSourceDO.getUsername());
	        dataSourceDTO.setPassword(dataSourceDO.getPassword());
	        return dataSourceDTO;
	    }
}
